main: Code cleanup by passing OstreeRepo * directly to builtins
authorColin Walters <walters@verbum.org>
Sun, 25 Aug 2013 19:11:05 +0000 (15:11 -0400)
committerColin Walters <walters@verbum.org>
Sun, 25 Aug 2013 19:28:23 +0000 (15:28 -0400)
commitedfa76fad5d2fc92d753c3317333200d552b99e9
tree6b76d3928db6c3dbcfde5292b58b5b06f4163ebd
parent6c61b1910714c5bde7f35594ab7fcd980d03c8f1
main: Code cleanup by passing OstreeRepo * directly to builtins

It turns out every builtin (with one special exception) that takes a
repo argument did the same thing; let's just centralize it.  The
special exception was "ostree init --repo=foo" where foo is expected
to *not* actually be a repo.  In that case, simply skip the
ostree_repo_check() invocation.

https://bugzilla.gnome.org/show_bug.cgi?id=706762
27 files changed:
src/libostree/ostree-repo.c
src/libostree/ostree-repo.h
src/ostree/main.c
src/ostree/ot-builtin-admin.c
src/ostree/ot-builtin-cat.c
src/ostree/ot-builtin-checkout.c
src/ostree/ot-builtin-checksum.c
src/ostree/ot-builtin-commit.c
src/ostree/ot-builtin-config.c
src/ostree/ot-builtin-diff.c
src/ostree/ot-builtin-fsck.c
src/ostree/ot-builtin-init.c
src/ostree/ot-builtin-log.c
src/ostree/ot-builtin-ls.c
src/ostree/ot-builtin-prune.c
src/ostree/ot-builtin-pull-local.c
src/ostree/ot-builtin-pull.c
src/ostree/ot-builtin-refs.c
src/ostree/ot-builtin-remote.c
src/ostree/ot-builtin-reset.c
src/ostree/ot-builtin-rev-parse.c
src/ostree/ot-builtin-show.c
src/ostree/ot-builtin-trivial-httpd.c
src/ostree/ot-builtin-write-refs.c
src/ostree/ot-builtins.h
src/ostree/ot-main.c
src/ostree/ot-main.h